<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>qq延时提示符</title>
    <style type="text/css">
        body, div {
            margin: 0;
            padding: 0;
        }

        .page {
            width: 1360px;
            height: 768px;
            background: url(image/bg.png) no-repeat;
            margin: 0 auto;
            position: relative;
        }

        .right {
            width: 306px;
            height: 530px;
            background: url(image/qq.png) no-repeat;
            position: absolute;
            right: 15px;
            top: 20px;
        }

        #head {
            width: 50px;
            height: 50px;
            background: url(image/link.png) 0 -50px no-repeat;
            float: left;
            margin: 265px 0 0 7px;
        }

        a#head:hover {
            background-position: 0px 1px;
        }

        #left {
            width: 279px;
            height: 334px;
            background: url(image/prompt.png) no-repeat;
            position: absolute;
            top: 250px;
            left: -282px;
            display: none;
        }
    </style>
    <script type="text/javascript">
        onload = function(){
            var headEle = document.getElementById("head");
            var leftEle = document.getElementById("left");
            var t;
            headEle.onmouseover = function(){
                clearTimeout(t);
                leftEle.style.display = 'block';
            }
            headEle.onmouseout =  function(){
                 t =setTimeout(function(){
                     leftEle.style.display = 'none';
                },500) 
            }
            leftEle.onmouseover = function(){
                // 目的：保持 leftEle.style.display = 'block';
                clearTimeout(t);
            }
            leftEle.onmouseout = function(){
                 t =setTimeout(function(){
                     leftEle.style.display = 'none';
                },500) 
            }

          

        }
      

    </script>
</head>
<body>
<div class="page">
    <div class="right">
        <a href="###" id="head"></a>
        <div id="left"></div>
    </div>
</div>
</body>
<script>
    // var oHead = document.getElementById("head");
    // var oLeft = document.getElementById("left");
    // //var timer;
    // oHead.onmouseover = function () {
    //     clearTimeout(oLeft.timer);
    //     oLeft.style.display = "block";
    // }
    // oHead.onmouseout = function () {
    //     oLeft.timer = setTimeout(function () {
    //         oLeft.style.display = "none";
    //     }, 1000);
    // }
    // oLeft.onmouseover = function () {
    //     clearTimeout(this.timer);
    // }
    // oLeft.onmouseout = function () {
    //     oLeft.timer = setTimeout(function () {
    //         oLeft.style.display = "none";
    //     }, 1000);
    // }

</script>


</html>
